package com.ehualu.esresult;

import com.ehualu.esresult.utils.LoadProperties;

/**
 * @Author: 吴敬超
 * @Date: 2020/7/8 17:37
 */
public class loaduser {
    public static String esServers = "es.servers";

    public static void main(String[] args) {

        LoadProperties loadProc = LoadProperties.getInstance();
        String esurl = loadProc.getValues(esServers, "192.168.22.14:9200");

        System.out.println(esurl);

        String[] es = esurl.split(",");
        int index = (int) (Math.random() * es.length);

        String esuser = es[index];

        System.out.println(esuser);

    }
}
